package BehavioralPattern.Strategy.Strategy;

import BehavioralPattern.Strategy.SaleStrategy;

/**
 * @Classname : SaleContext
 * @Description : 策略上下文
 * @Author : chentianyu
 * @Date 2023/2/26 10:44
 */


public class SaleContext {
    private SaleStrategy strategy;

    public SaleContext(SaleStrategy strategy) {
        this.strategy = strategy;
    }

    public void sell(float price) {
        this.strategy.sell(price);
    }
}
